#ifndef _P2D_FORCE_H_
#define _P2D_FORCE_H_

#include "particle_2d.h"
#include <string>
namespace math
{
    class Mat4x4;
};

namespace LuaPlus
{
    class LuaObject;
};


namespace part2d
{

/**
* @brief Abstract base class for forces applied to particle systems
* 
* Particle systems can have multiple forces being applied to them;
* examples include gravity, kill-planes, containement spheres, etc
*/
class P2DForce
{
public:
    enum ForceAction 
    {
        Move,
        Bounce,
        Kill
    };

    /**
    * Initialize class
    */
                    P2DForce() {};
    /**
    * Destroy class
    * force it to be instantiated
    */
    virtual         ~P2DForce() {};

    /**
    * Load settings for particle force from LUA Object
    * @param    _LObj     Lua Table to load from
    */
    virtual bool    Load(LuaPlus::LuaObject& _LObj) = 0;

    /**
    * Render a visual representation of this force
    */
	virtual bool	RenderDebug(const math::Vec2& Pos) = 0;

    /**
    * Update all active particles in this set
    */
    virtual	bool	MoveParticles(const math::Vec2& Pos, Particle2D* _Particles, unsigned int _usCount, float dt) = 0;

    /**
    * Clone ourselves
    */
	virtual P2DForce*	Clone() = 0;
protected:
    ForceAction     GetAction(const std::string& _Str);
};

};

#endif //_P2D_FORCE_H_